vchiq_arm: Add completion records under the mutex
authorPhil Elwell <phil@raspberrypi.org>
Thu, 21 Apr 2016 12:49:32 +0000 (13:49 +0100)
committerRaspbian kernel package updater <root@raspbian.org>
Thu, 15 Feb 2018 17:28:30 +0000 (17:28 +0000)
commitf5c856afa915191e244effc775df288d00dd68d8
tree2b0530d781af6e32577dea5a786b3e83f9642226
parent631104fe7546c38b6201f4e37b8b564f58b32317
vchiq_arm: Add completion records under the mutex

An issue was observed when flushing openmax components
which generate a large number of messages returning
buffers to host.

We occasionally found a duplicate message from 16
messages prior, resulting in a buffer returned twice.

While only one thread adds completions, without the
mutex you don't get the protection of the automatic
memory barrier you get with synchronisation objects.

Signed-off-by: Phil Elwell <phil@raspberrypi.org>
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c